<nz-spin [nzSpinning]="isBusy">
    <form nz-form [formGroup]="formGroup">
        <nz-form-item>
            <nz-form-label [nzSpan]="7">信息系统编号</nz-form-label>
            <nz-form-control [nzSpan]="17" [nzErrorTip]="infoSystemNoError">
                <input nz-input type="text" formControlName="infoSystemNo" [(ngModel)]="infoSystemNo"/>
                <ng-template #infoSystemNoError let-control>
                    <ng-container *ngIf="control.hasError('required')">
                        信息系统编号不可为空！
                    </ng-container>
                </ng-template>
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSpan]="7">信息系统名称</nz-form-label>
            <nz-form-control [nzSpan]="17" [nzErrorTip]="infoSystemNameError">
                <input nz-input type="text" formControlName="infoSystemName" [(ngModel)]="infoSystemName"/>
                <ng-template #infoSystemNameError let-control>
                    <ng-container *ngIf="control.hasError('required')">
                        信息系统名称不可为空！
                    </ng-container>
                </ng-template>
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSpan]="7">系统管理员账号</nz-form-label>
            <nz-form-control [nzSpan]="17" [nzErrorTip]="adminLoginIdError">
                <input nz-input type="text" formControlName="adminLoginId" [(ngModel)]="adminLoginId"/>
                <ng-template #adminLoginIdError let-control>
                    <ng-container *ngIf="control.hasError('required')">
                        系统管理员账号不可为空！
                    </ng-container>
                </ng-template>
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSpan]="7">应用程序类型</nz-form-label>
            <nz-form-control [nzSpan]="17" [nzErrorTip]="applicationTypeError">
                <nz-select nzAllowClear nzPlaceHolder="请选择" formControlName="applicationType"
                           [(ngModel)]="selectedApplicationType">
                    <nz-option *ngFor="let applicationType of applicationTypes" [nzValue]="applicationType.key"
                               [nzLabel]="applicationType.value"></nz-option>
                </nz-select>
                <ng-template #applicationTypeError let-control>
                    <ng-container *ngIf="control.hasError('required')">
                        应用程序类型不可为空！
                    </ng-container>
                </ng-template>
            </nz-form-control>
        </nz-form-item>
    </form>
</nz-spin>
<div class="form-footer">
    <nz-space>
        <button type="submit" nz-button *nzSpaceItem nzType="primary" [nzLoading]="isBusy" (click)="submit()">
            确定
        </button>
        <button type="button" nz-button *nzSpaceItem (click)="cancel()">
            取消
        </button>
    </nz-space>
</div>
